home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 131 / XENIATGM131.iso / Goodies / I-WAR 2 Egde of Chaos - New SDK / IW2-EOC_Pog_Scripting_SDK.exe / include / Lock.h < prev    next >
C/C++ Source or Header  |  2002-01-14  |  1KB  |  76 lines

  1. //
  2. // (c) 1999 Particle Systems Ltd. All Rights Reserved
  3. //
  4. // Lock.h
  5. //
  6. // API for the package Lock.
  7. //
  8. // Revision control information:
  9. //
  10. // $Header: /flux/packages/Lock.h 2     11/06/00 11:24 Derekm $
  11. //
  12.  
  13. #include "Flux.h"
  14.  
  15. #ifdef FLUX_COMPILE
  16.  
  17. FLUX_DECLARE_EXTENSION(Lock);
  18.  
  19. #ifdef FLUX_LIB
  20. #if _MSC_VER >= 1000
  21. #pragma comment( lib, "lock" )
  22. #endif // _MSC_VER >= 1000
  23. #endif // FLUX_LIB
  24.  
  25. #else
  26.  
  27. // Declare lock handle
  28. handle hlock : hobject;
  29.  
  30. // Include
  31. uses String;
  32.  
  33. //
  34. // Creation/destruction - name should be the FcObject name.
  35. // The lock will not be created if it duplicates the name of another
  36. // lock.
  37. //
  38.  
  39. //
  40. // hlock Lock.Create( string name )
  41. //
  42. // Create a lock called name.
  43. //
  44. prototype hlock Lock.Create( string name );
  45.  
  46. //
  47. // Lock.Destroy( hlock lock )
  48. //
  49. // Destroy a lock called name
  50. //
  51. prototype Lock.Destroy( hlock lock );
  52.  
  53. //
  54. // hlock Lock.Find( string name )
  55. //
  56. // Find a lock
  57. //
  58. prototype hlock Lock.Find( string name );
  59.  
  60. //
  61. // bool Lock.Claim( hlock lock )
  62. //
  63. // Claim a lock - return false if the lock is currently claimed
  64. //
  65. prototype bool Lock.Claim( hlock lock );
  66.  
  67. //
  68. // Lock.Release( hlock lock )
  69. //
  70. // Release a lock
  71. //
  72. prototype Lock.Release( hlock lock );
  73.  
  74. #endif // FLUX_LIB
  75.  
  76.